<template>
	<view class="apply">
		<view class="apply_content">
			假如从事人力资源行业相关经验，想成为本平台代招工人员，请点击申请成为代招工合伙人。
		</view>
		<view class="tips">
			对不起，该信息目前只针对平台的代招工合伙人开发
		</view>
		<view class="bottom ">
			<u-button type="primary" :custom-style="customStyle" @click="submit">申请成为代招工合伙人</u-button>
			<view class="flex">
				<u-button type="info" size="medium" @click="close">取消</u-button>
				<u-button type="primary" size="medium" @click="submit">了解详情</u-button>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return {
				shareNum : 3,
				customStyle: {
					marginBottom: '20px', // 注意驼峰命名，并且值必须用引号包括，因为这是对象
				}
			}
		},
		onLoad(e) {
			this.recruitId = e.id;
		},
		methods:{
			submit() {
				this.$u.api.applyBig().then(res => {
					if (res.status == true) {
						uni.showToast({
							title: '申请成功！',
							duration: 2000
						});
						
						setTimeout(() => {
							uni.reLaunch({
								url: '/pages/index/index'
							})
							uni.setStorageSync('role','big')
						}, 2000)
					} else {
						uni.showToast({
							title: res.msg,
							duration: 2000,
							icon: 'none'
						});
					} 
				})
			},
			close() {
				uni.navigateBack()
			}
		}
	}
</script>
<style>
   page{ background:#FFFFFF }
</style>
<style lang="scss" scoped>
	.apply_content{
		padding: 300upx 100upx 0upx;
		height: 700upx;
		font-size: 50upx;
	}
	.tips{
		margin-bottom: 30upx;
		text-align: center;
	}
	.bottom{
		margin: 0 auto;
		width: 600upx;
		.flex{
			justify-content: space-between;
		}
	}
</style>
